package com.siyu.prewarn.warncondition.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.siyu.prewarn.warncondition.mapper.WarnConditionMapper;
import com.siyu.prewarn.warncondition.domain.WarnCondition;
import com.siyu.prewarn.warncondition.service.IWarnConditionService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.siyu.prewarn.warncondition.mapper.WarnConditionMapper;
import com.siyu.prewarn.warncondition.domain.WarnCondition;
import com.siyu.prewarn.warncondition.service.IWarnConditionService;

/**
 * 报警条件信息Service业务层处理
 *
 * @author hrhy
 * @date 2024-06-15
 */
@Service
public class WarnConditionServiceImpl extends ServiceImpl<WarnConditionMapper, WarnCondition> implements IWarnConditionService {
    @Autowired
    private WarnConditionMapper warnConditionMapper;

    /**
     * 查询报警条件信息
     *
     * @param id 报警条件信息主键
     * @return 报警条件信息
     */
    @Override
    public WarnCondition selectWarnConditionById(String id) {
        return warnConditionMapper.selectWarnConditionById(id);
    }

    /**
     * 查询报警条件信息列表
     *
     * @param warnCondition 报警条件信息
     * @return 报警条件信息
     */
    @Override
    public List<WarnCondition> selectWarnConditionList(WarnCondition warnCondition) {
        return warnConditionMapper.selectWarnConditionList(warnCondition);
    }

    /**
     * 新增报警条件信息
     *
     * @param warnCondition 报警条件信息
     * @return 结果
     */
    @Override
    public int insertWarnCondition(WarnCondition warnCondition) {
        return warnConditionMapper.insertWarnCondition(warnCondition);
    }

    /**
     * 修改报警条件信息
     *
     * @param warnCondition 报警条件信息
     * @return 结果
     */
    @Override
    public int updateWarnCondition(WarnCondition warnCondition) {
        return warnConditionMapper.updateWarnCondition(warnCondition);
    }

    /**
     * 批量删除报警条件信息
     *
     * @param ids 需要删除的报警条件信息主键
     * @return 结果
     */
    @Override
    public int deleteWarnConditionByIds(String[] ids) {
        return warnConditionMapper.deleteWarnConditionByIds(ids);
    }

    /**
     * 删除报警条件信息信息
     *
     * @param id 报警条件信息主键
     * @return 结果
     */
    @Override
    public int deleteWarnConditionById(String id) {
        return warnConditionMapper.deleteWarnConditionById(id);
    }
}


